/*     */ package com.lmpop.trade.ti_trainsign;
/*     */ 
/*     */ import com.lmpop.frame.QueryList;
/*     */ import com.lmpop.frame.SysMap;
/*     */ import com.lmpop.frame.TradeInterf;
/*     */ import com.lmpop.frame.dao.DbmInterf;
/*     */ import com.lmpop.frame.exp.ApplicationException;
/*     */ import java.util.Hashtable;
/*     */ import java.util.List;
/*     */ 
/*     */ public class Ti_trainsignInfo
/*     */   implements TradeInterf
/*     */ {
/*     */   QueryList queryList;
/*     */ 
/*     */   public Ti_trainsignInfo()
/*     */   {
/*  15 */     this.queryList = new QueryList();
/*     */   }
/*     */ 
/*     */   public SysMap insert(DbmInterf dbmMgr, SysMap map)
/*     */   {
/*  24 */     Ti_trainsign ti_trainsign = new Ti_trainsign();
/*  25 */     ti_trainsign.setTrade_id(map.getString("trade_id"));
/*  26 */     ti_trainsign.setCust_id(map.getString("session_cust_id"));
/*  27 */     ti_trainsign.setClass_attr(map.getString("class_attr"));
/*  28 */     ti_trainsign.setName(map.getString("name"));
/*  29 */     ti_trainsign.setSex(map.getString("sex"));
/*  30 */     ti_trainsign.setBirth(map.getString("birth"));
/*  31 */     ti_trainsign.setIdnumber(map.getString("idnumber"));
/*  32 */     ti_trainsign.setCollege(map.getString("college"));
/*  33 */     ti_trainsign.setWorkspace(map.getString("workspace"));
/*  34 */     ti_trainsign.setAddr(map.getString("addr"));
/*  35 */     ti_trainsign.setPhone(map.getString("phone"));
/*  36 */     ti_trainsign.setCellphone(map.getString("cellphone"));
/*  37 */     ti_trainsign.setEmail(map.getString("email"));
/*  38 */     ti_trainsign.setQq(map.getString("qq"));
/*  39 */     ti_trainsign.setMsn(map.getString("msn"));
/*  40 */     ti_trainsign.setSelfdesc(map.getString("selfdesc"));
/*  41 */     ti_trainsign.setSelfintro(map.getString("selfintro"));
/*  42 */     ti_trainsign.setLeaveword(map.getString("leaveword"));
/*  43 */     ti_trainsign.setState(map.getString("state"));
/*  44 */     ti_trainsign.setUser_id(map.getString("session_user_id"));
/*  45 */     ti_trainsign.setIn_date(map.getString("in_date"));
/*  46 */     ti_trainsign.setFare(map.getString("fare"));
/*  47 */     ti_trainsign.setFare_date(map.getString("fare_date"));
/*     */ 
/*  49 */     String result_code = "0";
/*     */     try {
/*  51 */       insert(dbmMgr, ti_trainsign);
/*     */     } catch (ApplicationException e) {
/*  53 */       e.printStackTrace();
/*  54 */       result_code = "1";
/*     */     }
/*  56 */     map.setString("result_code", result_code);
/*  57 */     return map;
/*     */   }
/*     */ 
/*     */   public void insert(DbmInterf dbmMgr, Ti_trainsign ti_trainsign)
/*     */     throws ApplicationException
/*     */   {
/*  66 */     dbmMgr.update("insertTi_trainsign", ti_trainsign);
/*     */   }
/*     */ 
/*     */   public SysMap delete(DbmInterf dbmMgr, SysMap map)
/*     */   {
/*  76 */     String pkid_string = map.getString("pkid");
/*  77 */     String result_code = "0";
/*     */     try {
/*  79 */       if (!pkid_string.equals("")) {
/*  80 */         String[] pkStr = pkid_string.split("\\|");
/*  81 */         for (int i = 0; i < pkStr.length; i++) {
/*  82 */           if (pkStr[i].equals("")) continue; delete(dbmMgr, pkStr[i]);
/*     */         }
/*     */       }
/*     */     } catch (ApplicationException e) {
/*  86 */       e.printStackTrace();
/*  87 */       result_code = "1";
/*     */     }
/*  89 */     map.setString("result_code", result_code);
/*  90 */     return map;
/*     */   }
/*     */ 
/*     */   public void delete(DbmInterf dbmMgr, String pkid)
/*     */     throws ApplicationException
/*     */   {
/*  99 */     dbmMgr.update("deleteTi_trainsign", pkid);
/*     */   }
/*     */ 
/*     */   public SysMap update(DbmInterf dbmMgr, SysMap map)
/*     */   {
/* 108 */     Ti_trainsign ti_trainsign = new Ti_trainsign();
/* 109 */     ti_trainsign.setTrade_id(map.getString("trade_id"));
/* 110 */     ti_trainsign.setCust_id(map.getString("cust_id"));
/* 111 */     ti_trainsign.setClass_attr(map.getString("class_attr"));
/* 112 */     ti_trainsign.setName(map.getString("name"));
/* 113 */     ti_trainsign.setSex(map.getString("sex"));
/* 114 */     ti_trainsign.setBirth(map.getString("birth"));
/* 115 */     ti_trainsign.setIdnumber(map.getString("idnumber"));
/* 116 */     ti_trainsign.setCollege(map.getString("college"));
/* 117 */     ti_trainsign.setWorkspace(map.getString("workspace"));
/* 118 */     ti_trainsign.setAddr(map.getString("addr"));
/* 119 */     ti_trainsign.setPhone(map.getString("phone"));
/* 120 */     ti_trainsign.setCellphone(map.getString("cellphone"));
/* 121 */     ti_trainsign.setEmail(map.getString("email"));
/* 122 */     ti_trainsign.setQq(map.getString("qq"));
/* 123 */     ti_trainsign.setMsn(map.getString("msn"));
/* 124 */     ti_trainsign.setSelfdesc(map.getString("selfdesc"));
/* 125 */     ti_trainsign.setSelfintro(map.getString("selfintro"));
/* 126 */     ti_trainsign.setLeaveword(map.getString("leaveword"));
/* 127 */     ti_trainsign.setState(map.getString("state"));
/* 128 */     ti_trainsign.setUser_id(map.getString("user_id"));
/* 129 */     ti_trainsign.setIn_date(map.getString("in_date"));
/* 130 */     ti_trainsign.setFare(map.getString("fare"));
/* 131 */     ti_trainsign.setFare_date(map.getString("fare_date"));
/*     */ 
/* 133 */     String result_code = "0";
/*     */     try {
/* 135 */       update(dbmMgr, ti_trainsign);
/*     */     } catch (ApplicationException e) {
/* 137 */       e.printStackTrace();
/* 138 */       result_code = "1";
/*     */     }
/* 140 */     map.setString("result_code", result_code);
/* 141 */     return map;
/*     */   }
/*     */ 
/*     */   public void update(DbmInterf dbmMgr, Ti_trainsign ti_trainsign)
/*     */     throws ApplicationException
/*     */   {
/* 150 */     dbmMgr.update("updateTi_trainsign", ti_trainsign);
/*     */   }
/*     */ 
/*     */   public List getListByPage(Object obj, int start, int limit)
/*     */   {
/* 160 */     Hashtable ti_trainsign = (Hashtable)obj;
/* 161 */     if (start == 0)
/* 162 */       start = 0;
/*     */     else {
/* 164 */       start = (start - 1) * limit;
/*     */     }
/* 166 */     ti_trainsign.put("start", Integer.valueOf(start));
/* 167 */     ti_trainsign.put("limit", Integer.valueOf(limit));
/* 168 */     return this.queryList.getList("getListByTi_trainsignPage", ti_trainsign);
/*     */   }
/*     */ 
/*     */   public int getCountByObj(Object obj)
/*     */   {
/* 179 */     Hashtable ti_trainsign = (Hashtable)obj;
/* 180 */     List list = this.queryList.getList("getCountByObjTi_trainsign", ti_trainsign);
/* 181 */     int count = 0;
/* 182 */     if ((list != null) && (list.size() > 0)) {
/* 183 */       Hashtable newsMap = (Hashtable)list.get(0);
/* 184 */       if ((newsMap.get("count") != null) && (!newsMap.get("count").toString().equals(""))) {
/* 185 */         count = Integer.parseInt(newsMap.get("count").toString());
/*     */       }
/*     */     }
/* 188 */     return count;
/*     */   }
/*     */ 
/*     */   public List getListByPk(String pk)
/*     */   {
/* 198 */     return this.queryList.getList("getTi_trainsignByPk", pk);
/*     */   }
/*     */ }

/* Location:           F:\电商\commons-utils.jar
 * Qualified Name:     com.lmpop.trade.ti_trainsign.Ti_trainsignInfo
 * JD-Core Version:    0.6.0
 */